all:
	$(MAKE) td_browser.o routines.o cmd.o CC='gcc' FLAGS='-O3 -Wall'
	gcc -o td_browser td_browser.o routines.o cmd.o -L. -ltd_bdd -Wall

win32:
	$(MAKE) td_browser.o routines.o cmd.o CC='gcc' FLAGS='-O3 -Wall'
	gcc -o td_browser td_browser.o routines.o cmd.o -L. -ltd_bdd -Wall

cross-win:
	$(MAKE) td_browser.o routines.o cmd.o CC='cross-gcc' FLAGS='-O3 -Wall'
	cross-gcc -o td_browser.exe td_browser.o routines.o cmd.o -L. -ltd_bdd -Wall
	cross-strip --strip-all td_browser.exe
	
	
td_browser.o: td_browser.c browser.h
	$(CC) -c td_browser.c $(FLAGS)

routines.o: routines.c browser.h
	$(CC) -c routines.c $(FLAGS)

cmd.o: cmd.c browser.h
	$(CC) -c cmd.c $(FLAGS)

clean:
	rm -f *.o
	rm -f *~*
